\(\int \frac {\cos (a+b \sqrt {c+d x})}{x} \, dx\) [93]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 18, antiderivative size = 126 \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\cos \left (a-b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\cos \left (a+b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \]

[Out]

Ci(b*(c^(1/2)+(d*x+c)^(1/2)))*cos(a-b*c^(1/2))+Ci(b*c^(1/2)-b*(d*x+c)^(1/2))*cos(a+b*c^(1/2))-Si(b*(c^(1/2)+(d
*x+c)^(1/2)))*sin(a-b*c^(1/2))+Si(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))

Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3513, 3384, 3380, 3383} \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\cos \left (a-b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\cos \left (a+b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \]

[In]

Int[Cos[a + b*Sqrt[c + d*x]]/x,x]

[Out]

Cos[a - b*Sqrt[c]]*CosIntegral[b*(Sqrt[c] + Sqrt[c + d*x])] + Cos[a + b*Sqrt[c]]*CosIntegral[b*Sqrt[c] - b*Sqr
t[c + d*x]] - Sin[a - b*Sqrt[c]]*SinIntegral[b*(Sqrt[c] + Sqrt[c + d*x])] + Sin[a + b*Sqrt[c]]*SinIntegral[b*S
qrt[c] - b*Sqrt[c + d*x]]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3513

Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.)*((g_.) + (h_.)*(x_))^(m_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Cos[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rubi steps \begin{align*} \text {integral}& = \frac {2 \text {Subst}\left (\int \left (-\frac {d \cos (a+b x)}{2 \left (\sqrt {c}-x\right )}+\frac {d \cos (a+b x)}{2 \left (\sqrt {c}+x\right )}\right ) \, dx,x,\sqrt {c+d x}\right )}{d} \\ & = -\text {Subst}\left (\int \frac {\cos (a+b x)}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )+\text {Subst}\left (\int \frac {\cos (a+b x)}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right ) \\ & = \cos \left (a-b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\cos \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )-\cos \left (a+b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\cos \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\sin \left (b \sqrt {c}+b x\right )}{\sqrt {c}+x} \, dx,x,\sqrt {c+d x}\right )-\sin \left (a+b \sqrt {c}\right ) \text {Subst}\left (\int \frac {\sin \left (b \sqrt {c}-b x\right )}{\sqrt {c}-x} \, dx,x,\sqrt {c+d x}\right ) \\ & = \cos \left (a-b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\cos \left (a+b \sqrt {c}\right ) \operatorname {CosIntegral}\left (b \sqrt {c}-b \sqrt {c+d x}\right )-\sin \left (a-b \sqrt {c}\right ) \text {Si}\left (b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+\sin \left (a+b \sqrt {c}\right ) \text {Si}\left (b \sqrt {c}-b \sqrt {c+d x}\right ) \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 1.27 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.15 \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\frac {1}{2} e^{-i \left (a+b \sqrt {c}\right )} \left (\operatorname {ExpIntegralEi}\left (-i b \left (-\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i \left (a+b \sqrt {c}\right )} \operatorname {ExpIntegralEi}\left (i b \left (-\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i b \sqrt {c}} \operatorname {ExpIntegralEi}\left (-i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )+e^{2 i a} \operatorname {ExpIntegralEi}\left (i b \left (\sqrt {c}+\sqrt {c+d x}\right )\right )\right ) \]

[In]

Integrate[Cos[a + b*Sqrt[c + d*x]]/x,x]

[Out]

(ExpIntegralEi[(-I)*b*(-Sqrt[c] + Sqrt[c + d*x])] + E^((2*I)*(a + b*Sqrt[c]))*ExpIntegralEi[I*b*(-Sqrt[c] + Sq
rt[c + d*x])] + E^((2*I)*b*Sqrt[c])*ExpIntegralEi[(-I)*b*(Sqrt[c] + Sqrt[c + d*x])] + E^((2*I)*a)*ExpIntegralE
i[I*b*(Sqrt[c] + Sqrt[c + d*x])])/(2*E^(I*(a + b*Sqrt[c])))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(270\) vs. \(2(102)=204\).

Time = 1.08 (sec) , antiderivative size = 271, normalized size of antiderivative = 2.15

method result size
derivativedivides \(\frac {\frac {b \left (a +b \sqrt {c}\right ) \left (\operatorname {Si}\left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{\sqrt {c}}-\frac {b \left (a -b \sqrt {c}\right ) \left (-\operatorname {Si}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{\sqrt {c}}-2 b^{2} a \left (\frac {\operatorname {Si}\left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{2 b \sqrt {c}}-\frac {-\operatorname {Si}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{2 b \sqrt {c}}\right )}{b^{2}}\) \(271\)
default \(\frac {\frac {b \left (a +b \sqrt {c}\right ) \left (\operatorname {Si}\left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )\right )}{\sqrt {c}}-\frac {b \left (a -b \sqrt {c}\right ) \left (-\operatorname {Si}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )\right )}{\sqrt {c}}-2 b^{2} a \left (\frac {\operatorname {Si}\left (b \sqrt {c}-b \sqrt {d x +c}\right ) \sin \left (a +b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}-b \sqrt {c}\right ) \cos \left (a +b \sqrt {c}\right )}{2 b \sqrt {c}}-\frac {-\operatorname {Si}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \sin \left (a -b \sqrt {c}\right )+\operatorname {Ci}\left (b \sqrt {d x +c}+b \sqrt {c}\right ) \cos \left (a -b \sqrt {c}\right )}{2 b \sqrt {c}}\right )}{b^{2}}\) \(271\)

[In]

int(cos(a+b*(d*x+c)^(1/2))/x,x,method=_RETURNVERBOSE)

[Out]

2/b^2*(1/2*b*(a+b*c^(1/2))/c^(1/2)*(Si(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))+Ci(b*(d*x+c)^(1/2)-b*c^(1/2
))*cos(a+b*c^(1/2)))-1/2*b*(a-b*c^(1/2))/c^(1/2)*(-Si(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2))+Ci(b*(d*x+c)
^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2)))-b^2*a*(1/2/b/c^(1/2)*(Si(b*c^(1/2)-b*(d*x+c)^(1/2))*sin(a+b*c^(1/2))+Ci(b*
(d*x+c)^(1/2)-b*c^(1/2))*cos(a+b*c^(1/2)))-1/2/b/c^(1/2)*(-Si(b*(d*x+c)^(1/2)+b*c^(1/2))*sin(a-b*c^(1/2))+Ci(b
*(d*x+c)^(1/2)+b*c^(1/2))*cos(a-b*c^(1/2)))))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.27 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.18 \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\frac {1}{2} \, {\rm Ei}\left (i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (i \, a + \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (i \, a - \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (-i \, \sqrt {d x + c} b - \sqrt {-b^{2} c}\right ) e^{\left (-i \, a + \sqrt {-b^{2} c}\right )} + \frac {1}{2} \, {\rm Ei}\left (-i \, \sqrt {d x + c} b + \sqrt {-b^{2} c}\right ) e^{\left (-i \, a - \sqrt {-b^{2} c}\right )} \]

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x,x, algorithm="fricas")

[Out]

1/2*Ei(I*sqrt(d*x + c)*b - sqrt(-b^2*c))*e^(I*a + sqrt(-b^2*c)) + 1/2*Ei(I*sqrt(d*x + c)*b + sqrt(-b^2*c))*e^(
I*a - sqrt(-b^2*c)) + 1/2*Ei(-I*sqrt(d*x + c)*b - sqrt(-b^2*c))*e^(-I*a + sqrt(-b^2*c)) + 1/2*Ei(-I*sqrt(d*x +
 c)*b + sqrt(-b^2*c))*e^(-I*a - sqrt(-b^2*c))

Sympy [F]

\[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int \frac {\cos {\left (a + b \sqrt {c + d x} \right )}}{x}\, dx \]

[In]

integrate(cos(a+b*(d*x+c)**(1/2))/x,x)

[Out]

Integral(cos(a + b*sqrt(c + d*x))/x, x)

Maxima [F]

\[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int { \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x} \,d x } \]

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x,x, algorithm="maxima")

[Out]

integrate(cos(sqrt(d*x + c)*b + a)/x, x)

Giac [F]

\[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int { \frac {\cos \left (\sqrt {d x + c} b + a\right )}{x} \,d x } \]

[In]

integrate(cos(a+b*(d*x+c)^(1/2))/x,x, algorithm="giac")

[Out]

integrate(cos(sqrt(d*x + c)*b + a)/x, x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\cos \left (a+b \sqrt {c+d x}\right )}{x} \, dx=\int \frac {\cos \left (a+b\,\sqrt {c+d\,x}\right )}{x} \,d x \]

[In]

int(cos(a + b*(c + d*x)^(1/2))/x,x)

[Out]

int(cos(a + b*(c + d*x)^(1/2))/x, x)